package com.gitee.utils

import com.typesafe.config.{Config, ConfigFactory}

object GlobalConfigUtil {
  private val config:Config = ConfigFactory.load()

  val `partition` = config.getString("partition")

  val `bootstrap.servers` = config.getString("bootstrap.servers")
  val `zookeeper.connect` = config.getString("zookeeper.connect")
  val `input.topic.ods_log` = config.getString("input.topic.ods_log")
  val `group.id` = config.getString("group.id")
  val `enable.auto.commit` = config.getString("enable.auto.commit")
  val `auto.commit.interval.ms` = config.getString("auto.commit.interval.ms")
  val `auto.offset.reset` = config.getString("auto.offset.reset")
  val `key.serializer` = config.getString("key.serializer")
  val `value.serializer` = config.getString("value.serializer")
  val `key.deserializer` = config.getString("key.deserializer")
  val `value.deserializer` = config.getString("value.deserializer")
  val `output.topic.dwd_log` = config.getString("output.topic.dwd_log")
  val `redis.server.ip` = config.getString("redis.server.ip")
  val `redis.server.port` = config.getString("redis.server.port")
  val `ip.file.path` = config.getString("ip.file.path")
  val `mysql.server.ip` = config.getString("mysql.server.ip")
  val `mysql.server.port` = config.getString("mysql.server.port")
  val `mysql.server.database` = config.getString("mysql.server.database")
  val `mysql.server.username` = config.getString("mysql.server.username")
  val `mysql.server.password` = config.getString("mysql.server.password")

  def main(args: Array[String]): Unit = {
    println(`bootstrap.servers`)
    println(`zookeeper.connect`)
    println(`output.topic.dwd_log`)
    println(`group.id`)
    println(`enable.auto.commit`)
    println(`auto.commit.interval.ms`)
    println(`auto.offset.reset`)
  }
}
